<?php
/*****************************************************************************
*
*	copyright(c) - sitemile.com - PricerrTheme
*	More Info: http://sitemile.com/p/pricerr
*	Coder: Saioc Dragos Andrei
*	Email: andreisaioc@gmail.com
*
******************************************************************************/

function PricerrTheme_my_account_area_function()
{
	global $current_user;
	get_currentuserinfo();
	$uid = $current_user->ID;
	
	//-------------------------------------	
	?>
    
    
    
    <div id="content">
		<!-- page content here -->	
			
            
                <div class="box_title3"><?php _e("My Jobs",'PricerrTheme'); ?></div>           
            	
            	
                <div class="job_info_stuff2">
                  <div class="padd5">
                   
                  <div class="font-my-account-info"><?php _e("Active","PricerrTheme"); ?>: <?php echo pricerrTheme_nr_active_jobs($uid); ?></div>
                  <div class="separator_my-account"></div> 
                  
                  
                  <div class="font-my-account-info"><?php _e("Inactive","PricerrTheme"); ?>: <?php echo pricerrTheme_nr_inactive_jobs($uid); ?></div>
                  <div class="separator_my-account"></div> 
               
               		
                  <div class="font-my-account-info"><?php _e("In Review","PricerrTheme"); ?>: <?php echo pricerrTheme_nr_in_review_jobs($uid); ?></div>

               </div>
               </div>
               <!-- ####### --> 
            	
                <div class="box_content">    
				
                
                <?php
				global $wp_query;
				$query_vars = $wp_query->query_vars;
				$post_per_page = 10;				
				
				query_posts( "meta_key=closed&meta_value=0&post_status=publish,draft&post_type=job&order=DESC&orderby=id&author=".$uid.
				"&posts_per_page=".$post_per_page."&paged=".$query_vars['paged'] );

				if(have_posts()) :
				while ( have_posts() ) : the_post();
					PricerrTheme_get_post_small();
				endwhile;
				
				if(function_exists('wp_pagenavi')):
				wp_pagenavi(); endif;
				
				 else:
				
				_e("There are no jobs yet.",'PricerrTheme');
				
				endif;
				
				wp_reset_query();
				
				?>
                
                
                
           </div>
          
		
		
		<!-- page content here -->	
		</div>		
    
    
    
    <?php
	
	PricerrTheme_get_users_links();
	
}


?>